package com.itheima.test3;

import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class Send {
    public static void main(String[] args) throws Exception {
        DatagramSocket ds=new DatagramSocket();
        String str="雨夜擒蛟龙";
        byte[] pack=str.getBytes();
        DatagramPacket dp=new DatagramPacket(pack, pack.length, InetAddress.getByName("224.0.1.1"),10001);
        ds.send(dp);
        ds.close();
    }
}